Simplify $\tan \frac{\pi}{24} + \tan \frac{7 \pi}{24}.$
Answer: We can write
\[\tan \frac{\pi}{24} + \tan \frac{7 \pi}{24} = \frac{\sin \frac{\pi}{24}}{\cos \frac{\pi}{24}} + \frac{\sin \frac{7 \pi}{24}}{\cos \frac{7 \pi}{24}} 
= \frac{\sin \frac{\pi}{24} \cos \frac{7 \pi}{24} + \cos \frac{\pi}{24} \sin \frac{7 \pi}{24}}{\cos \frac{\pi}{24} \cos \frac{7 \pi}{24}}.\]By the angle addition formula and the product-to-sum formula,
\begin{align*}
\frac{\sin \frac{\pi}{24} \cos \frac{7 \pi}{24} + \cos \frac{\pi}{24} \sin \frac{7 \pi}{24}}{\cos \frac{\pi}{24} \cos \frac{7 \pi}{24}} &= \frac{\sin (\frac{\pi}{24} + \frac{7 \pi}{24})}{\frac{1}{2} (\cos \frac{\pi}{3} + \cos \frac{\pi}{4})} \\
&= \frac{2 \sin \frac{\pi}{3}}{\cos \frac{\pi}{3} + \cos \frac{\pi}{4}} \\
&= \frac{\sqrt{3}}{\frac{1}{2} + \frac{\sqrt{2}}{2}} \\
&= \frac{2 \sqrt{3}}{1 + \sqrt{2}} \\
&= \frac{2 \sqrt{3} (\sqrt{2} - 1)}{(\sqrt{2} + 1)(\sqrt{2} - 1)} \\
&= \boxed{2 \sqrt{6} - 2 \sqrt{3}}.
\end{align*}